home *** CD-ROM | disk | FTP | other *** search
- rem Copyright (c) PhoneLink plc
- rem direct connect script (24/8/95)
- rem Changes to version 2 include faster disconnect methods
- rem and general fine tuning of timeouts!
-
- label InitDevice
- echo off
- flush
- echo script[56]
- send "atchar(13)"
- timeout 2,modem_fail
- find "OK"
-
- label OffToGate
- rem Offline to Gate (also contains Pad to Gate)
- echo off
- flush
- echo script[57]
- send "at{InitModemStr}char(13)"
- timeout 2,modem_fail
- find "OK"
- send "atd{DialMode}{PreTel}{SiteTel}{PostFix}char(13)"
- echo script[52]...
- timeout {DialTimeout},connect_fail
- finderr 0,BUSY,busy
- finderr 103,NO DIALTONE,connect_fail
- finderr 0,NO CARRIER,no_carrier
- find "CONNECT"
- echo script[53]
- send "char(13)"
- timeout 2,Bad_PadPrompt
- finderr 0,PAD>,Good_PadPrompt
- find "ZZZ"
- label Bad_PadPrompt
- echo script[58]
- send "char(13)"
- timeout 2,pad_fail
- find "PAD>"
- label Good_PadPrompt
- label PadToGate
- echo off
- send "SER{SUB}char(13)"
- timeout 2,nua_bad1
- finderr 0,COM,nua_good
- find "ZZZ"
- label nua_bad1
- send "SER{SUB}char(13)"
- timeout 2,nua_bad2
- finderr 0,COM,nua_good
- find "ZZZ"
- label nua_bad2
- send "SER{SUB}char(13)"
- timeout 2,nua_fail
- find "COM"
- label nua_good
- echo script[54].
- end
-
- label GateToPad
- echo off
- send "char(16)CLRchar(13)"
- timeout 2,ctrl_p_clear_fail
- find "CONF"
- echo script[91]...
- end
-
- label GateToOff
- label PadToOff
- echo off
- wait 1
- send "+"
- mwait 100
- send "+"
- mwait 100
- send "+"
- timeout 2,hang_fail_retry
- find "OK"
- echo script[97]
- wait 1
- send "at{TermModemStr}char(13)"
- timeout 2,hang_Fail
- find "OK"
- echo script[99].
- end
-
- label modem_offline
- echo off
- wait 1
- send "+"
- mwait 100
- send "+"
- mwait 100
- send "+"
- timeout 2,hang_fail_retry
- find "OK"
- echo script[97]
- wait 1
- send "at{TermModemStr}char(13)"
- timeout 2,hang_Fail
- find "OK"
- echo script[99].
- abort
-
- label hang_fail_retry
- send "at{TermModemStr}char(13)"
- timeout 2,hang_fail
- find "OK"
- echo script[99].
- abort
-
- label hang_fail
- echo script[98].
- dtrtoggle
- abort
-
-
- label modem_fail
- echo script[23]
- goto modem_offline
-
- label connect_fail
- echo script[1]
- goto modem_offline
-
- label busy
- echo script[2]
- goto modem_offline
-
- label no_carrier
- echo script[3]
- goto modem_offline
-
- label nua_fail
- echo script[22]
- goto modem_offline
-
- label ctrl_p_clear_fail
- echo script[14]
- goto modem_offline
-
- label command_mode_fail
- echo script[15]
- goto modem_offline
-
-